export default {
  // 获取播放列表
  playList (state) {
    return state.playList.length
      ? state.playList
      : JSON.parse(window.localStorage.getItem('playList')) || []
  },
  // 获取当前播放歌曲的索引
  playIndex (state) {
    return (
      state.playIndex ||
      JSON.parse(window.localStorage.getItem('playIndex')) ||
      '0'
    )
  },
  // 获取当前歌曲详细信息
  curSongInfo (state) {
    return state.playList[state.playIndex]
  },
  // 获取当前是否处于播放状态
  isPlayed (state) {
    return state.isPlayed
  },
  // 获取当前歌曲的播放提示信息
  playListTips (state) {
    return state.playListTips
  }
}
